Try out this reverse Polish notation calculator. It works like some popular scientific calculators. Instead of tapping 5 + 3, you tap "5", "Enter", "3", "+". Try these:
- Approximate PI: tap "2", tap "2", tap "Enter", tap "7" and tap "/"
[Postfix: 22 7 /]- Calculate (5+3)/(4-2): tap "5", tap "Enter", tap "3", tap "+", tap "Enter", tap "4", tap "Enter", tap "2", tap "-", tap "/".
[Postfix: 5 3 + 4 2 - /]
function push(aform) { // push onto stack stack[sktop] = ""+aform.answer.value // increase the top of the stack sktop++ // reset the answer to zero aform.answer.value = "0" // show the new stack showstack(aform) // reset for entering a new number restart = true entry = "" }